﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>易买网 - 首页</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="scripts/function.js"></script>
</head>
<body>
<%@include file="nav.jsp"%>
<div id="position" class="wrap">
	您现在的位置：<a href="productSelectByPage">易买网</a>
	&gt;
	<c:choose>
		<c:when test="${classId == 16 || classId == 17}">
			图像音像
		</c:when>
		<c:otherwise>
			百货
		</c:otherwise>
	</c:choose>
	> ${className}
</div>
<div id="main" class="wrap">
	<%@include file="left.jsp"%>
	<div class="main">
		<div class="product-list">
			<h2>
				<a href="productSelectByPage">全部商品</a>
				&gt;
				<c:choose>
					<c:when test="${classId == 16 || classId == 17}">
						图像音像
					</c:when>
					<c:otherwise>
						百货
					</c:otherwise>
				</c:choose>
				&gt; ${className}
			</h2>
			<div class="clear"></div>
			<ul class="product clearfix">
				<c:forEach var="product" items="${list}" varStatus="status">
					<li>
						<dl>
							<dt><a href="productSelectById?id=${product.ep_id}" target="_blank">
								<img src="data:image/jpeg;base64,${images[status.index]}" /></a></dt>
							<dd class="title">
								<a href="productSelectById?id=${product.ep_id}" target="_blank">
									${product.ep_name}</a>
							</dd>
							<dd class="price">￥${product.ep_price}</dd>
						</dl>
					</li>
				</c:forEach>

			</ul>
			<div class="clear"></div>
			<div class="pager">
				<ul class="clearfix">
					<c:if test="${pageIndex !=1 }">
						<li><a href="productSelectByPage?pageIndex=1&classId=${classId}">首页</a></li>
						<li><a href="productSelectByPage?pageIndex=${pageIndex-1}&classId=${classId}">上一页</a></li>
					</c:if>

					<li class="current">${pageIndex}/${maxPage}</li>
					<c:if test="${pageIndex != maxPage}">
						<li><a href="productSelectByPage?pageIndex=${pageIndex+1}&classId=${classId}">下一页</a></li>
						<li><a href="productSelectByPage?pageIndex=${maxPage}&classId=${classId}">末页</a></li>
					</c:if>
				</ul>
			</div>
		</div>
	</div>
	<div class="clear"></div>
</div>
<div id="footer">
	Copyright &copy; 2022 卓京教育 All Rights Reserved. 湘ICP证1001号
</div>
</body>
</html>
